package com.jiaai.web.zfp_back.anchor;

import com.alibaba.dubbo.config.annotation.Reference;
import com.jiaai.member.api.IAccusationAPI;
import com.jiaai.util.RestResultGenerator;
import org.springframework.web.bind.annotation.*;

/**
 * class_name:ZBAccusationController
 * describe:TODO
 * create_user:张昉平
 * create_date:2017/12/20
 * create_date:11:25
 */
@RestController
@RequestMapping("/api/v1/admin/accuse")
public class ZBAccusationController {

    @Reference
    private IAccusationAPI iAccusationAPI;

    @GetMapping("/list")
    public Object list(@RequestParam Integer curr){
        return RestResultGenerator.genSuccessResult(iAccusationAPI.getAll(curr));
    }

    @PostMapping("/looked/{id}")
    public Object looked(@PathVariable("id") Integer id){
        iAccusationAPI.looked(id);
        return RestResultGenerator.genSuccessResult("成功");
    }
}
